From 4f37e6833c356ac3c70e084ede86ff05db84f703 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 6 Aug 2010 22:41:21 +0200 Subject: [PATCH] x11: Create empty cursor without old functions In particular, clear the bitmap manually instead of using create_from_data. --- gdk/x11/gdkcursor-x11.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index a9373f6600..ca3c05f6c1 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -161,10 +161,15 @@ get_blank_cursor (GdkDisplay *display) Pixmap source_pixmap; XColor color; Cursor cursor; + cairo_t *cr; screen = gdk_display_get_default_screen (display); - pixmap = gdk_bitmap_create_from_data (gdk_screen_get_root_window (screen), - "\0\0\0\0\0\0\0\0", 1, 1); + pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen), 1, 1, 1); + /* Clear Pixmap */ + cr = gdk_cairo_create (pixmap); + cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); + cairo_paint (cr); + cairo_destroy (cr); source_pixmap = GDK_PIXMAP_XID (pixmap); -- 2.30.2